# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-mdutils
_pkgname=${pkgname#python-}
pkgver=1.8.0
pkgrel=1
pkgdesc='Set of basic tools that can help to create a markdown file.'
arch=('any')
url='https://github.com/didix21/mdutils'
license=('MIT')
depends=('python')
makedepends=('python-build' 'python-pip')
options=(!emptydirs)
source=("https://github.com/didix21/$_pkgname/archive/refs/tags/v$pkgver.tar.gz")
sha512sums=('c2837c0d74b45964e9d996b0c1cc39243f16422e58e7fa464a5675963a87e0849ce0bb985b08272b4a044891afe855cb508a33769216c8b129e97faea6b43beb')

build() {
  cd "$_pkgname-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd "$_pkgname-$pkgver"

  pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    $_pkgname
}

